package java1909;

import java.util.Scanner;

public class xiti2_1 {
public static void main(String[] args) {
	Scanner scanner = new Scanner(System.in);
	int a,b,c,n;
	for(n = 100; n < 1000;n++) {
		a = n/100;
		b = (n-a*100)/10;
		c = n % 10;
		if(n == a * a * a + b * b * b + c* c *c  ) 
		printf("%d",n);
			
		printf("\n");	
		return 0;
	}
	
}
}
